package cn.wolfcode.luowowo.common.util;

import cn.wolfcode.luowowo.common.exception.DisableException;

/**
 * Created by Administrator on 2019/7/5.
 */
public class AssertUtil {
    private AssertUtil() {
    }

    public static void isNull(String str, String msg) {
        if (StringUtil.notHasLength(str)) {
            throw new DisableException(msg);
        }
    }

    public static void isEquals(String v1, String v2, String msg) {
        if(v1==null || v2==null){
            throw new DisableException("传入的判断参数不能为空");
        }
        if (!v1.equals(v2)){
            throw new DisableException(msg);
        }
    }
}
